package top.buyibuyi.course.service.Impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.buyibuyi.course.dao.SelectCourseDao;
import top.buyibuyi.course.pojo.Course;
import top.buyibuyi.course.service.SelectCourseService;

import java.util.List;

@Service
public class SelectCourseServiceImpl implements SelectCourseService {

    @Autowired
    private SelectCourseDao selectCourseDao;
    @Override
    public List<Course> selectCourse(int startPage, int limit, String cname) {
        return selectCourseDao.selectCourse(startPage,limit,cname);
    }

    @Override
    public int selectCount(Course cname) {
        return selectCourseDao.selectCount(cname);
    }

    @Override
    public Course selectCourseById(int id) {
        return selectCourseDao.selectCourseById(id);
    }
}
